Class IndexedHeapNode

  • All Implemented Interfaces:
    java.lang.Comparable<HeapNode>

    public class IndexedHeapNode
    extends HeapNode
    Author:
    Cesar Martin
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int i  
      • Fields inherited from class edu.claflin.finder.logic.communities.struct.HeapNode

        EPSILON
    • Constructor Summary

      Constructors 
      Constructor Description
      IndexedHeapNode​(int i, int j, double q)  
    • Field Detail

      • i

        private int i
    • Constructor Detail

      • IndexedHeapNode

        public IndexedHeapNode​(int i,
                               int j,
                               double q)
    • Method Detail

      • getI

        public int getI()
        Returns:
        the i
      • setI

        public void setI​(int i)
      • setInfo

        public void setInfo​(int i,
                            int j,
                            double q)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class HeapNode
      • compareTo

        public int compareTo​(HeapNode that)
        Description copied from class: HeapNode
        Compare this HeapNode to that HeapNode. We want before means higher Q, then smaller j
        Specified by:
        compareTo in interface java.lang.Comparable<HeapNode>
        Overrides:
        compareTo in class HeapNode
        Parameters:
        that - the HeapNode to compare this to
        Returns:
        -1 if this goes before, 0 if they are equal, 1 if that goes before
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class HeapNode